<#include "/common/head.ftl">

<@showTitle title="${i18n.getMessage('offering')} > ${i18n.getMessage('opinion')}">
	<a href="#" onclick="cc('offering/showAddEvaluateTeacher.sgt?offeringId=${(offering.id)!}')">Evaluate Instructor</a>
	- <a href="#" onclick="cc('offering/showAddAbsence.sgt?offeringId=${(offering.id)!}')">Add Absence</a>
	- <a href="#" onclick="cc('offering/showAddComment.sgt?offeringId=${(offering.id)!}')">Add Assessment</a>
	- <a href="#" onclick="cc('offering/showAddSuggestion.sgt?offeringId=${(offering.id)!}')">Add Suggestion</a>
	- <a href="#" onclick="cc('offering/showAddClassSituation.sgt?offeringId=${(offering.id)!}')">Add Class Situation</a>
	- <a href="#" onclick="cc('offering/showInfoOffering.sgt?id=${(offering.id)!}')">${i18n.getMessage('offering')}</a>
</@showTitle>

<br/>

<h4>Students' Evaluations</h4>
<@display.table id="listTable" name="offering.evaluateTeachers">
	<@display.column title="Instructor's name"><textarea style="width:95%;height:70px;background-color:#FFFAFA" readonly>${(listTable.teacher)!}</textarea></@display.column>
	<@display.column title="Methodology"><textarea style="width:95%;height:70px;background-color:#FFFAFA" readonly>${(listTable.methodology)!}</textarea></@display.column>
	<@display.column title="Preparation"><textarea style="width:95%;height:70px;background-color:#FFFAFA" readonly>${(listTable.skills)!}</textarea></@display.column>
	<@display.column title="${i18n.getMessage('edit')}" style="text-align:center;width:60px"><img src="images/edit.gif" onclick="cc('offering/showEditEvaluateTeacher.sgt?offeringId=${(offering.id)!}&id=${(listTable.id)!}');" style="cursor:pointer"/></@display.column>
	<@display.column title="${i18n.getMessage('delete')}" style="text-align:center;width:60px"><img src="images/delete.gif" onclick="if(confirm('${i18n.getMessage('dialog.delete')}')) { cc('offering/deleteEvaluateTeacher.sgt?offeringId=${(offering.id)!}&id=${(listTable.id)!}'); }" style="cursor:pointer"/></@display.column>
</@display.table>

<br/>

<h4><a href="javascript:void()" onclick="ReverseContentDisplay('attendance')">Attendance</a></h4>
<div id="attendance" style="border-style: none; padding: 0px; overflow: auto; display: block; width: 100%; height: 200%;">
<@display.table id="listTable" name="offering.members">
	<@display.column title="${i18n.getMessage('student')}" style="width:30%">${(listTable.receipt.student.fullName)!}</@display.column>
	<@display.column title="${i18n.getMessage('dateOfBirth')}" property="receipt.student.dateOfBirth" format="{0,date,${i18n.getMessage('format.date')}}" style="text-align:center;width:20%"></@display.column>
	<@display.column title="${i18n.getMessage('phoneNumber')}">${(listTable.receipt.student.phoneNumber)!}</@display.column>
	<@display.column title="${i18n.getMessage('absence.days')}" style="text-align:center;width:15%">${(listTable.absentAttendances.size())!}</@display.column>
</@display.table>
</div>

<br/>

<h4>Student Care Service</h4>
<@display.table id="listTable" name="offering.absences">
	<@display.column title="${i18n.getMessage('student')}" style="width:20%">${(listTable.offeringMember.receipt.student.fullName)!}</@display.column>
	<@display.column title="${i18n.getMessage('absence.days')}" property="numOfAbsentDays" style="text-align:center;width:10%"></@display.column>
	<@display.column title="${i18n.getMessage('absence.contactingDate')}" property="contactingDate" format="{0,date,${i18n.getMessage('format.date')}}" style="text-align:center;width:15%"></@display.column>
	<@display.column title="${i18n.getMessage('reason')}" property="reason" maxLength="45"></@display.column>
	<@display.column title="${i18n.getMessage('edit')}" style="text-align:center;width:60px"><img src="images/edit.gif" onclick="cc('offering/showEditAbsence.sgt?offeringId=${(offering.id)!}&id=${(listTable.id)!}');" style="cursor:pointer"/></@display.column>
	<@display.column title="${i18n.getMessage('delete')}" style="text-align:center;width:60px"><img src="images/delete.gif" onclick="if(confirm('${i18n.getMessage('dialog.delete')}')) { cc('offering/deleteAbsence.sgt?offeringId=${(offering.id)!}&id=${(listTable.id)!}'); }" style="cursor:pointer"/></@display.column>	
</@display.table>

<br/>

<h4>Students' Assessments</h4>
<@display.table id="listTable" name="offering.opinions">
	<@display.column title="Assessment"><textarea style="height:70px;width:100%;background-color:#FFFAFA" readonly>${(listTable.content)!}</textarea></@display.column>
	<@display.column title="${i18n.getMessage('edit')}" style="text-align:center;width:60px"><img src="images/edit.gif" onclick="cc('offering/showEditComment.sgt?offeringId=${(offering.id)!}&id=${(listTable.id)!}');" style="cursor:pointer"/></@display.column>
	<@display.column title="${i18n.getMessage('delete')}" style="text-align:center;width:60px"><img src="images/delete.gif" onclick="if(confirm('${i18n.getMessage('dialog.delete')}')) { cc('offering/deleteComment.sgt?offeringId=${(offering.id)!}&id=${(listTable.id)!}'); }" style="cursor:pointer"/></@display.column>	
</@display.table>

<br/>

<h4>Students' Suggestions</h4>
<@display.table id="listTable" name="offering.suggestions">
	<@display.column title="Suggestion"><textarea style="height:70px;width:100%;background-color:#FFFAFA" readonly>${(listTable.content)!}</textarea></@display.column>
	<@display.column title="${i18n.getMessage('edit')}" style="text-align:center;width:60px"><img src="images/edit.gif" onclick="cc('offering/showEditSuggestion.sgt?offeringId=${(offering.id)!}&id=${(listTable.id)!}');" style="cursor:pointer"/></@display.column>
	<@display.column title="${i18n.getMessage('delete')}" style="text-align:center;width:60px"><img src="images/delete.gif" onclick="if(confirm('${i18n.getMessage('dialog.delete')}')) { cc('offering/deleteSuggestion.sgt?offeringId=${(offering.id)!}&id=${(listTable.id)!}'); }" style="cursor:pointer"/></@display.column>	
</@display.table>

<h4>Class Situation</h4>
<@display.table id="listTable" name="offering.classSituations">
	<@display.column title="${i18n.getMessage('student')}" style="width:30%">${(listTable.offeringMember.receipt.student.fullName)!}</@display.column>
	<@display.column title="${i18n.getMessage('date')}" property="date" format="{0,date,${i18n.getMessage('format.date')}}" style="text-align:center;width:20%"></@display.column>
	<@display.column title="${i18n.getMessage('situation')}">${(listTable.situation)!}</@display.column>
	<@display.column title="${i18n.getMessage('comment')}">${(listTable.comment)!}</@display.column>
	<@display.column title="${i18n.getMessage('progress')}">${(listTable.progress)!}</@display.column>
	<@display.column title="${i18n.getMessage('edit')}" style="text-align:center;width:60px"><img src="images/edit.gif" onclick="cc('offering/showEditClassSituation.sgt?offeringId=${(offering.id)!}&id=${(listTable.id)!}');" style="cursor:pointer"/></@display.column>
	<@display.column title="${i18n.getMessage('delete')}" style="text-align:center;width:60px"><img src="images/delete.gif" onclick="if(confirm('${i18n.getMessage('dialog.delete')}')) { cc('offering/deleteClassSituation.sgt?offeringId=${(offering.id)!}&id=${(listTable.id)!}'); }" style="cursor:pointer"/></@display.column>	
</@display.table>

<script language="javascript" type="text/javascript">
	ReverseContentDisplay = function(d) {
		if(d.length < 1) { return; }
		var dd = document.getElementById(d);
		if(dd.style.display == "none") {  
			Slide(d).down();
		}
		else { 
			Slide(d).up();
		}
	}
</script>